#include "utils.h"


void DelayNuS(unsigned int i)
{
  unsigned char t = 0;
  for (; i > 0; i--)
  {
    for (t = 0; t < 2; t++)
    {
    }
  }
}

void USART_SendBytes(USART_TypeDef* USARTx, const uint8_t *bytes, int len)
{
  int i;
  DelayNuS(5000);

  for (i = 0; i < len; i++) {
    USART_SendData(USARTx, bytes[i]);
    while (USART_GetFlagStatus(USARTx, USART_FLAG_TXE) == RESET)
      ;
  }

  DelayNuS(5000);
}

